Added ability to ignore empty & whitespace strings#73
Closed
ludvigeriksson wants to merge 1 commit intoFlineDev:stablefrom
ludvigeriksson:stable
Closed
Added ability to ignore empty & whitespace strings#73ludvigeriksson wants to merge 1 commit intoFlineDev:stablefrom ludvigeriksson:stable
ludvigeriksson wants to merge 1 commit intoFlineDev:stablefrom
ludvigeriksson:stable
Conversation
Member
|
Hi @ludvigeriksson and thank you for this pull request. Could you please add the following so I can merge this:
|
Jeehut
reviewed
Oct 16, 2017
| for newTranslation in newTranslations { | ||
| // skip keys marked for ignore | ||
| guard !newTranslation.value.containsAny(of: ignores) else { continue } | ||
| if ignoreEmptyStrings && newTranslation.value.trimmingCharacters(in: .whitespaces).isEmpty { continue } |
Member
There was a problem hiding this comment.
Please use the .isBlank method from HandySwift instead of .trimmingCharacters(in: .whitespaces).isEmpty.
Member
There was a problem hiding this comment.
Also I'd actually prefer a guard here as the continue is a jump command and those should all be part of guards. I know that we have a negation then, but I prefer guards nevertheless.
Member
|
@ludvigeriksson Any idea when you will have time to complete your feature? |
Member
|
Closing this due to inactivity. Feel free to open a new PR if you have more time again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When having empty strings (consisting of whitespace only) in the storyboard there is now an option to not add them to the strings file. For example, you might have a whitespace only string on the back button in the navigation bar.
This adds the command line option
i(long versionignore-empty-strings), which enables the option.